from django.db import models


# Create your models here.
# 基础信息
class StockBasic(models.Model):
    ts_code = models.CharField(verbose_name="TS股票代码", primary_key=True, db_index=True, max_length=9)
    symbol = models.CharField(verbose_name="股票代码", db_index=True, max_length=6)
    name = models.CharField(verbose_name="股票名称", max_length=16)
    area = models.CharField(verbose_name="地域", max_length=16, null=True)
    industry = models.CharField(verbose_name="所属行业", max_length=16, null=True)
    fullname = models.CharField(verbose_name="股票全称", max_length=200, null=True)
    enname = models.CharField(verbose_name="英文全称", max_length=200, null=True)
    market = models.CharField(verbose_name="市场类型", max_length=16, null=True)
    cnspell = models.CharField(verbose_name="拼音缩写", db_index=True, max_length=16, null=True)
    exchange = models.CharField(verbose_name="交易所代码", max_length=16, null=True)
    curr_type = models.CharField(verbose_name="交易货币", max_length=16, null=True)
    list_status = models.CharField(verbose_name="上市状态 L上市 D退市 P暂停上市", max_length=1, null=True)
    list_date = models.CharField(verbose_name="上市日期", max_length=10, null=True)
    delist_date = models.CharField(verbose_name="退市日期", max_length=10, null=True)
    is_hs = models.CharField(verbose_name="是否沪深港通标的，N否 H沪股通 S深股通", max_length=1, null=True)
    act_name = models.CharField(verbose_name="实控人名称", max_length=40, null=True)
    act_ent_type = models.CharField(verbose_name="实控人企业性质", max_length=40, null=True)
